package com.ctshk.rpc.visa.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.visa.base.CustomBaseMapper;
import com.ctshk.rpc.visa.entity.VisaFreeCountries;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 免签国家 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-20
 */
public interface VisaFreeCountriesMapper extends CustomBaseMapper<VisaFreeCountries> {

    /**
     *  清空免签国家
     *
     * @param visaId
     * @param modifiedId
     * @return
     */
    @Update("UPDATE t_visa_free_countries \n" +
            "SET is_deleted = 1,modified_id = #{modified_id} WHERE visa_id = #{visa_id} AND is_deleted = 0")
    Integer clearByVisaId(@Param("visa_id") Long visaId, @Param("modified_id") Long modifiedId);

}
